home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / cde.idb / usr / dt / share / man / cat3 / XmVaCreateSimplePulldownMenu.z / XmVaCreateSimplePulldownMenu
Encoding:
Text File  |  2003-11-18  |  12.2 KB  |  331 lines

  1.  
  2.  
  3.  
  4.      XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnUUUUuuuuNNNN((((IIII3333XXXXXXXX))))SSSSyyyyssssXXXXttttmmmmeeeeVVVVmmmmaaaaCCCCVVVVrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu((((3333XXXX))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       _X_m_V_a_C_r_e_a_t_e_S_i_m_p_l_e_P_u_l_l_d_o_w_n_M_e_n_u - A RowColumn widget
  10.       convenience creation function
  11.  
  12.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.       #include <Xm/RowColumn.h>
  14.  
  15.       Widget XmVaCreateSimplePulldownMenu (ppppaaaarrrreeeennnntttt,,,, nnnnaaaammmmeeee,,,, ppppoooosssstttt____ffffrrrroooommmm____bbbbuuuuttttttttoooonnnn,,,,
  16.             ccccaaaallllllllbbbbaaaacccckkkk,,,, aaaarrrrgggg............)
  17.            _W_i_d_g_e_t     ppppaaaarrrreeeennnntttt;
  18.            _S_t_r_i_n_g     nnnnaaaammmmeeee;
  19.            _i_n_t     ppppoooosssstttt____ffffrrrroooommmm____bbbbuuuuttttttttoooonnnn;
  20.            _X_t_C_a_l_l_b_a_c_k_P_r_o_cccccaaaallllllllbbbbaaaacccckkkk;
  21.  
  22.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.       _X_m_V_a_C_r_e_a_t_e_S_i_m_p_l_e_P_u_l_l_d_o_w_n_M_e_n_u creates an instance of a
  24.       RowColumn widget of type _X_m_M_E_N_U__P_U_L_L_D_O_W_N and returns the
  25.       associated widget ID.     This routine uses the ANSI C
  26.       variable-length argument list    (varargs) calling convention.
  27.  
  28.       This routine creates a Pulldown MenuPane and its button
  29.       children.  The name of each button is    button_nnnn, where    nnnn is
  30.       an integer from 0 to one minus the number of buttons in the
  31.       menu.     The name of each separator is separator_nnnn, where nnnn is
  32.       an integer from 0 to one minus the number of separators in
  33.       the menu.  The name of each title is label_nnnn,    where nnnn    is an
  34.       integer from 0 to one    minus the number of titles in the
  35.       menu.     Buttons, separators, and titles are named and created
  36.       in the order in which    they are specified in the variable
  37.       portion of the argument list.
  38.  
  39.       This routine also attaches the PulldownMenu to a
  40.       CascadeButton    or CascadeButtonGadget in the parent.  The
  41.       PulldownMenu is then posted from this    button.
  42.  
  43.       ppppaaaarrrreeeennnntttt
  44.            Specifies the widget ID of the parent of    the MenuShell.
  45.  
  46.       nnnnaaaammmmeeee Specifies the name of the created widget.
  47.  
  48.       ppppoooosssstttt____ffffrrrroooommmm____bbbbuuuuttttttttoooonnnn
  49.            Specifies the CascadeButton or CascadeButtonGadget in
  50.            the parent to which the Pulldown    MenuPane is attached.
  51.            The value is the    integer    nnnn that corresponds to the nnnnth
  52.            CascadeButton or    CascadeButtonGadget specified for the
  53.            parent of the Pulldown MenuPane.     A Pulldown MenuPane
  54.            can be attached only to a CascadeButton or
  55.            CascadeButtonGadget, and    only CascadeButtons and
  56.            CascadeButtonGadgets are    counted    in determining the
  57.            integer nnnn.  The first CascadeButton or
  58.            CascadeButtonGadget is number 0.
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                        (printed 11/11/03)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnUUUUuuuuNNNN((((IIII3333XXXXXXXX))))SSSSyyyyssssXXXXttttmmmmeeeeVVVVmmmmaaaaCCCCVVVVrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu((((3333XXXX))))
  71.  
  72.  
  73.  
  74.       ccccaaaallllllllbbbbaaaacccckkkk
  75.            Specifies a callback procedure to be called when    a
  76.            button is activated or when its value changes.  This
  77.            callback    function is added to each button after
  78.            creation.  For a    CascadeButtonGadget or a
  79.            PushButtonGadget, the callback is added as the button's
  80.            _X_m_N_a_c_t_i_v_a_t_e_C_a_l_l_b_a_c_k, and    it is called when the button
  81.            is activated.  For a ToggleButtonGadget,    the callback
  82.            is added    as the button's    _X_m_N_v_a_l_u_e_C_h_a_n_g_e_d_C_a_l_l_b_a_c_k, and
  83.            it is called when the button's value changes.  The
  84.            button number is    returned in the    cccclllliiiieeeennnntttt____ddddaaaattttaaaa field.
  85.  
  86.       The variable portion of the argument list consists of    groups
  87.       of arguments.     The first argument in each group is a
  88.       constant or a    string and determines which arguments follow
  89.       in that group.  The last argument in the list    must be    NULL.
  90.       Following are    the possible first arguments in    each group of
  91.       varargs:
  92.  
  93.       _X_m_V_a_C_A_S_C_A_D_E_B_U_T_T_O_N
  94.            This is followed    by two additional arguments.  The set
  95.            specifies one button in the PulldownMenu    and some of
  96.            its resource values.  The button    created    is a
  97.            CascadeButtonGadget.  Following are the additional two
  98.            arguments, in this order:
  99.  
  100.       llllaaaabbbbeeeellll
  101.            The label string, of type XmString.
  102.  
  103.       mmmmnnnneeeemmmmoooonnnniiiicccc
  104.            The mnemonic, of    type KeySym.  This is followed by four
  105.            additional arguments.  The set specifies    one button in
  106.            the PulldownMenu    and some of its    resource values.  The
  107.            button created is a PushButtonGadget.  Following    are
  108.            the additional four arguments, in this order:
  109.  
  110.       llllaaaabbbbeeeellll
  111.            The label string, of type XmString.
  112.  
  113.       mmmmnnnneeeemmmmoooonnnniiiicccc
  114.            The mnemonic, of    type KeySym.
  115.  
  116.       aaaacccccccceeeelllleeeerrrraaaattttoooorrrr
  117.            The accelerator,    of type    String.
  118.  
  119.       aaaacccccccceeeelllleeeerrrraaaattttoooorrrr____tttteeeexxxxtttt
  120.            The accelerator text, of    type XmString.    This is
  121.            followed    by four    additional arguments.  The set
  122.            specifies one button in the PulldownMenu    and some of
  123.            its resource values.  The button    created    is a
  124.            ToggleButtonGadget.  Following are the additional four
  125.            arguments, in this order:
  126.  
  127.  
  128.  
  129.      Page 2                        (printed 11/11/03)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnUUUUuuuuNNNN((((IIII3333XXXXXXXX))))SSSSyyyyssssXXXXttttmmmmeeeeVVVVmmmmaaaaCCCCVVVVrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu((((3333XXXX))))
  137.  
  138.  
  139.  
  140.       llllaaaabbbbeeeellll
  141.            The label string, of type XmString.
  142.  
  143.       mmmmnnnneeeemmmmoooonnnniiiicccc
  144.            The mnemonic, of    type KeySym.
  145.  
  146.       aaaacccccccceeeelllleeeerrrraaaattttoooorrrr
  147.            The accelerator,    of type    String.
  148.  
  149.       aaaacccccccceeeelllleeeerrrraaaattttoooorrrr____tttteeeexxxxtttt
  150.            The accelerator text, of    type XmString.    This is
  151.            followed    by four    additional arguments.  The set
  152.            specifies one button in the PulldownMenu    and some of
  153.            its resource values.  The button    created    is a
  154.            ToggleButtonGadget.  Following are the additional four
  155.            arguments, in this order:
  156.  
  157.       llllaaaabbbbeeeellll
  158.            The label string, of type XmString.
  159.  
  160.       mmmmnnnneeeemmmmoooonnnniiiicccc
  161.            The mnemonic, of    type KeySym.
  162.  
  163.       aaaacccccccceeeelllleeeerrrraaaattttoooorrrr
  164.            The accelerator,    of type    String.
  165.  
  166.       aaaacccccccceeeelllleeeerrrraaaattttoooorrrr____tttteeeexxxxtttt
  167.            The accelerator text, of    type XmString.    This is
  168.            followed    by one additional argument.  The pair
  169.            specifies a title LabelGadget in    the PulldownMenu.
  170.            Following is the    additional argument:
  171.  
  172.       ttttiiiittttlllleeee
  173.            The title string, of type XmString.  This is followed
  174.            by no additional    arguments.  It specifies one separator
  175.            in the PulldownMenu.  This is followed by no additional
  176.            arguments.  It specifies    one separator in the
  177.            PulldownMenu.  The separator type is _X_m_D_O_U_B_L_E__L_I_N_E.
  178.            This is followed    by one additional argument, the    value
  179.            of the resource,    of type    XtArgVal.  The pair specifies
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                        (printed 11/11/03)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnUUUUuuuuNNNN((((IIII3333XXXXXXXX))))SSSSyyyyssssXXXXttttmmmmeeeeVVVVmmmmaaaaCCCCVVVVrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu((((3333XXXX))))
  203.  
  204.  
  205.  
  206.            a resource and its value    for the    RowColumn widget.
  207.            This is followed    by four    additional arguments.  The set
  208.            specifies a resource and    its value for the RowColumn
  209.            widget.    A resource type    conversion is performed    if
  210.            necessary.  Following are the additional    four
  211.            arguments, in this order:
  212.  
  213.       nnnnaaaammmmeeee The resource name, of type String.
  214.  
  215.       ttttyyyyppppeeee The type    of the resource    value supplied,    of type
  216.            String.
  217.  
  218.       vvvvaaaalllluuuueeee
  219.            The resource value (or a    pointer    to the resource    value,
  220.            depending on the    type and size of the value), of    type
  221.            XtArgVal.
  222.  
  223.       ssssiiiizzzzeeee The size    of the resource    value in bytes,    of type    int.
  224.            This is followed    by one additional argument of type
  225.            XtVarArgsList.  This argument is    a nested list of
  226.            varargs returned    by _X_t_V_a_C_r_e_a_t_e_A_r_g_s_L_i_s_t.
  227.  
  228.       For more information on variable-length argument lists, see
  229.       the X    Toolkit    Intrinsics documentation.
  230.  
  231.       A number of resources    exist specifically for use with    this
  232.       and other simple menu    creation routines.  For    a complete
  233.       definition of    RowColumn and its associated resources,    see
  234.       _X_m_R_o_w_C_o_l_u_m_n(_3_X).
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                        (printed 11/11/03)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      XXXXmmmmVVVVaaaaCCCCrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnUUUUuuuuNNNN((((IIII3333XXXXXXXX))))SSSSyyyyssssXXXXttttmmmmeeeeVVVVmmmmaaaaCCCCVVVVrrrreeeeaaaatttteeeeSSSSiiiimmmmpppplllleeeePPPPuuuullllllllddddoooowwwwnnnnMMMMeeeennnnuuuu((((3333XXXX))))
  269.  
  270.  
  271.  
  272.      RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  273.       Returns the RowColumn    widget ID.
  274.  
  275.      RRRREEEELLLLAAAATTTTEEEEDDDD IIIINNNNFFFFOOOORRRRMMMMAAAATTTTIIIIOOOONNNN
  276.       _X_m_C_r_e_a_t_e_P_u_l_l_d_o_w_n_M_e_n_u(_3_X), _X_m_C_r_e_a_t_e_R_o_w_C_o_l_u_m_n(_3_X),
  277.       _X_m_C_r_e_a_t_e_S_i_m_p_l_e_P_u_l_l_d_o_w_n_M_e_n_u, and _X_m_R_o_w_C_o_l_u_m_n(_3_X).
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                        (printed 11/11/03)
  328.  
  329.  
  330.  
  331.